﻿<div id="searchResults">
    <h2>Search results:
    </h2>
    <ul data-bind="foreach: results()">
        <li>
            <div data-bind="click: flightClick">
                <div data-bind="text: departDate() + ' - ' + airline()">
                </div>
                <div data-bind="text: departAirport() + ' to ' + arrivalAirport()">
                </div>
            </div>
            <div class="seats" data-bind="slideVisible: isExpanded()">
                <ul data-bind="foreach: classes()">
                    <li>
                        <div data-bind="text: 'Class: ' + name()"></div>
                        <div data-bind="text: 'Available seats: ' + seats()"></div>
                        <div data-bind="text: 'Price: ' + price() + '$'"></div>
                        <input class="actionButton" type="button" value="Book!" data-bind="click: book" />
                    </li>
                </ul>
            </div>
        </li>
    </ul>
</div>
